//
//  OosAuthor.m
//  Oos4ios
//
//  Created by Pablo Gonzalez on 3/24/11.
//  Copyright 2011 11870.com. All rights reserved.
//

#import "OosAuthor.h"
#import "OosElements.h"

@implementation OosAuthor

#pragma mark <oos:slug>

- (void) addExtensionDeclarations
{
	[super addExtensionDeclarations];
	Class entryClass = [self class];
	
	[self addExtensionDeclarationForParentClass:entryClass childClasses: 
	 // Oos extensions
	 [OosAvatar class], [OosSlug class], nil];
}

- (NSString *) slug									
{ 
	return [[self objectForExtensionClass:[OosSlug class]] stringValue]; 
}
- (void) setSlug: (NSString *) slug					
{ 
	OosSlug *oosSlug = [OosSlug valueWithString: slug];
	[self setObject:oosSlug forExtensionClass:[OosSlug class]]; 
}

- (NSString *) avatarUrl
{
	OosAvatar *avatar = [self objectForExtensionClass:[OosAvatar class]];
	return (avatar) ? [avatar contentStringValue] : nil;
}

@end
